package com.hualan.service.service.service;

import com.hualan.mapper.ConsultantsMapper;
import com.hualan.pojo.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ConsultantsServiceImpl implements ConsultantsService{
    @Autowired
    private ConsultantsMapper consultantsMapper;
    public List<Consultants> listAll() {
        return consultantsMapper.listAll();
    }

    public Consultants findById2(Integer id) {
        return consultantsMapper.findById2(id);
    }

    public List<Shanchang> findAll(Integer id) {
        return consultantsMapper.findAll(id);
    }

    public List<Shoufei> listAllShoufei(Integer id) {
        return consultantsMapper.listAllShoufei(id);
    }

    public List<Huifu> listAllHuifu(Integer id) {
        return consultantsMapper.listAllHuifu(id);
    }

    public List<Userpinglun> findByIdUserpinglun(Integer id) {
        return consultantsMapper.findByIdUserpinglun(id);
    }

    public List<Fabukecheng> findByIdFabukecheng(Integer id) {
        return consultantsMapper.findByIdFabukecheng(id);
    }



    // 添加模糊查询方法
    public List<Consultants> searchConsultants(String keyword) {
        return consultantsMapper.searchConsultants(keyword);  // 调用 Mapper 查询
    }
}
